<#assign basePath=request.contextPath>
<#include "${basePath}/include.ftl" >
<body>
    <div class="layui-container" style="padding: 15px 20px 20px 20px;">
        <form class="layui-form layui-form-pane" action="" id="form">
            <input type="hidden" name="userId" autocomplete="off" placeholder="用户id" class="layui-input" value="${user.userId}" >
            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">登录名称:</label>
                <div class="layui-input-block">
                    <input type="text" name="loginName" autocomplete="off" placeholder="以字母开头,4到10个字母或数字组成" class="layui-input" value="${user.loginName}" validate="required|loginName">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">部门名称:</label>
                <div class="layui-input-block">
                    <input type="text" name="deptName" autocomplete="off" placeholder="请选择部门" class="layui-input" readonly="true"
                           style="background-color: #eee;" onclick="setDeptId()" id="deptName" value="${dept.deptName}" validate="required">
                    <!-- 部门id  -->
                    <input type="hidden" name="deptId" autocomplete="off" class="layui-input" readonly="true"
                           style="background-color: #eee;"  id="deptId" value="${dept.deptId}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">用户名称:</label>
                <div class="layui-input-block">
                    <input type="text" name="userName" autocomplete="off" placeholder="请输入用户名称" class="layui-input" value="${user.userName}" validate="required">
                </div>
            </div>

            <!-- 不允许修改 人员修改密码 只能重置 -->
           <#-- <div class="layui-form-item">
                <label class="layui-form-label">用户密码:</label>
                <div class="layui-input-block">
                    <input type="password" name="password" autocomplete="off" placeholder="以大写字母开头,4位以上个字母或数字组成" class="layui-input" value="${user.password}" validate="required|passWord">
                </div>
            </div>-->

            <div class="layui-form-item" pane="">
                <label class="layui-form-label layui-input-required">账号状态:</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="0" title="正常" <#if (user.status =='0')>checked</#if>>
                    <input type="radio" name="status" value="1" title="停用" <#if (user.status =='1')>checked</#if>>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">手机:</label>
                <div class="layui-input-block">
                    <input type="number" name="phonenumber" autocomplete="off" placeholder="请输入手机" class="layui-input" value="${user.phonenumber}"  validate="telphone">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">邮箱:</label>
                <div class="layui-input-block">
                    <input type="text" name="email" autocomplete="off" placeholder="请输入邮箱" class="layui-input"  value="${user.email}"  validate="email">
                </div>
            </div>

            <div class="layui-form-item" pane="">
                <label class="layui-form-label layui-input-required">性别:</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="0" title="男" <#if (user.sex =='0')>checked</#if>>
                    <input type="radio" name="sex" value="1" title="女" <#if (user.sex =='1')>checked</#if>>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">岗位:</label>
                <div class="layui-input-block">
                    <input type="hidden"  autocomplete="off"  class="layui-input"  value="${other.postIds}"  id="postIds">
                    <select name="postIds" autocomplete="off" id="postId"  validate="required">
                        <option value="">请选择岗位</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label layui-input-required">角色:</label>
                <div class="layui-input-block">
                    <input type="text" name="roleNames" id="roleNames" style="background-color: #eee;" autocomplete="off" placeholder="请选择角色" class="layui-input" readonly="true"  value="${other.roleNames}" onclick="setRole()" validate="required">
                    <!-- 角色id组  -->
                    <input type="hidden" name="roleIds" autocomplete="off" class="layui-input" readonly="true"
                           style="background-color: #eee;"  id="roleIds"  value="${other.roleIds}"  >
                </div>
            </div>
        </form>
    </div>
</body>
<script type="text/javascript" src="${baseApp}/system/user/user_update.js"></script>
